Parsing text: Markdown
public static void main(String[] args) throws GettingUpdatesException, IOException { String yourToken = "YOUR TOKEN"; TelegramBot b = new TelegramBot(yourToken); b.sendMessage("chat_id", "*Bold markdown text*", "Markdown", false, false, 0, null); }
Parsing text: Html
public static void main(String[] args) throws GettingUpdatesException, IOException { String yourToken = "YOUR TOKEN"; TelegramBot b = new TelegramBot(yourToken); b.sendMessage("chat_id", "<b>Bold html text</b>", "html", false, false, 0, null); }
Here you can see the result:
For info on available tags: https://core.telegram.org/bots/api#formatting-options